package com.freen.fadmin.util.result;

public class ResultUtil {
    // 传参成功
    public static Result success(Integer code,String msg,Object object){
        Result result = new Result();
        result.setCode(200);
        result.setMsg("成功");
        result.setData(object);
        return result;
    }
    // 不传参成功
    public static Result success() {
        return success(200,"成功",null);
    }
    // 传参失败
    public static Result error(Integer code,String msg){
        Result result = new Result();
        result.setCode(code);
        result.setMsg(msg);
        return result;
    }
}
